![]() | JavaScript Syntax Check | Quick Primer | ![]() |
These methods are supported using JavaScript syntax.
Calling another procedure
In JavaScript procedures you can also call another JavaScript procedure just by including the procedure name. This also enables XpertRule @command syntax procedures to be invoked (i.e. called from the JavaScript syntax procedure). This is a useful way to utilise the more specialist XpertRule @commands that are not supported by the JavaScript syntax.
Calling an XpertRule procedure and an XpertRule function from a JavaScript procedure...xpertrule.message('Message1','Sample','OK'); #xrProcedure.run(); xpertrule.message('Message3 ' + #xrFunction.run('Fred'),'Sample','OK');XpertRule procedure 'xrProcedure'...
@Alert 'Message2','Sample','OK'XpertRule function 'xrFunction'...
FUNCTION (param1:S):S @SelectCase param1 @Case 'John' @Return 'Manchester' @Case 'Fred' @Return 'London' @EndSelect
Syntax: xpertrule.decodeData(<Message string>);
Syntax: xpertrule.encodeData([#object1, #object2], <include captured objects>, "XML"|"JSON");
Syntax: xpertrule.findObject(<object name>)
Syntax: xpertrule.getValuesToObject([<object id array>])
Syntax: xpertrule.lineOfReasoning()
Syntax: xpertrule.message(<contents>[,<title>]);
Syntax: xpertrule.pause(<passed string data>);
Syntax: xpertrule.phone(<method>,<param array of strings>);
Syntax: xpertrule.phoneFeature(<method>);
Syntax: xpertrule.setValuesWithObject(<xpertrule format javascript object>);
Syntax: xpertrule.urlFetch(<url>[,<post data string>])
Syntax: hierarchy.clear();
Syntax: hierarchy.toString();